package fun.cyhgraph.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import fun.cyhgraph.model.dto.*;
import fun.cyhgraph.model.entity.Order;
import fun.cyhgraph.result.PageResult;
import fun.cyhgraph.model.vo.OrderPaymentVO;
import fun.cyhgraph.model.vo.OrderStatisticsVO;
import fun.cyhgraph.model.vo.OrderSubmitVO;
import fun.cyhgraph.model.vo.OrderVO;
import jakarta.servlet.http.HttpServletRequest;

public interface OrderService extends IService<Order> {
    OrderSubmitVO submit(OrderSubmitDTO orderSubmitDTO , HttpServletRequest request);

    Integer unPayOrderCount(HttpServletRequest request);

    OrderVO getById(Integer id);

    PageResult userPage(int page, int pageSize, Integer status , String selectUser, HttpServletRequest request);

    void userCancelById(Integer id) throws Exception;

    void reOrder(Integer id , HttpServletRequest request);

    OrderPaymentVO payment(OrderPaymentDTO orderPaymentDTO , HttpServletRequest request);

    PageResult conditionSearch(OrderPageDTO orderPageDTO , HttpServletRequest request);

    OrderStatisticsVO statistics();
    OrderStatisticsVO statistics(Integer merchantId);

    void confirm(OrderConfirmDTO orderConfirmDTO);

    void reject(OrderRejectionDTO orderRejectionDTO);

    void cancel(OrderCancelDTO orderCancelDTO);

    void delivery(Integer id);

    void complete(Integer id);

    void reminder(Integer id);

    QueryWrapper<Order> getQueryWrapper(OrderPageDTO orderPageDTO , HttpServletRequest request);

    OrderVO getById1(Integer id, Integer userId);
}
